$(document).ready(function(){
	$('.js-oper-delete').click(function(){
		var _this = $(this);
		if(confirm("确定要删除"+_this.attr('name')+"？")){
			$.ajax({
				type : "POST",
				url : _this.attr('url'),
				data:"_method=delete",
				beforeSend : function(xhr) {
					showMsg('正在删除……');
				},
				error : function(xhr, status) {
					 hideMsg();
					 alert("删除失败！");
				},
				success : function(data) {
					 hideMsg();
			       if(data && data == true){
			    	   alert("删除成功！");
			    	   window.location.reload();
			       }else{
			    	   alert(data);
			       }
				}
			});
		}
	});
});